package com.example.demo.entity;

import lombok.Data;
import java.time.LocalDateTime;

/**
 * 对应数据库 chapters 表
 */
@Data
public class Chapter {
    private Integer chapterId;      // 章节id (INT, 自增主键)
    private String courseId;        // 所属课程id (VARCHAR(20), 外键)
    private String chapterName;     // 章节名称 (VARCHAR(100))
    private Integer chapterOrder;   // 章节顺序 (INT)
    private String description;     // 章节描述 (TEXT)
    private Integer chapterLevel;   // 章节级别 (INT)
    private LocalDateTime createdAt; // 创建时间
    private LocalDateTime updatedAt; // 更新时间

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public Integer getChapterLevel() {
        return chapterLevel;
    }

    public void setChapterLevel(Integer chapterLevel) {
        this.chapterLevel = chapterLevel;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getChapterOrder() {
        return chapterOrder;
    }

    public void setChapterOrder(Integer chapterOrder) {
        this.chapterOrder = chapterOrder;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }
}